<fieldset>
	<legend>
		<strong>Jobs for This Team</strong>
	</legend>

<table class="list">
	<tr>
		<th>Title</th>
		<th>Contact Person</th>
		<th># Involved</th>
		<th></th>
	</tr>

<% if @team.jobs.empty? %>
	</table>
	<div id="message">
		This team has no jobs.
	</div>
	
<% else %>

<% @team.jobs.each do |j| %>
	<tr class="<%= cycle("even","odd") %>">
		<td><%= link_to "#{j.title}", :controller => 'jobs', :action => 'show', :id => j.id %></td>
		<td><%= j.contact_person.full_name rescue nil %></td>
		<td><%= j.involvements.length %></td>
		<td>
			<%= link_to_remote (image_tag "delete_16x16.gif", :size => "12x12", :border => 0, :title => "Delete this job forever"),
			 	:url => {:action => 'delete_job', :id => j, :team_id => @team},
			 	:confirm => 'Are you sure you want to destroy this job record forever?' %>
		</td>
	</tr>
<% end %>

	</table>
<% end %>

<%= link_to 'Add Job', :controller => 'jobs', :action => 'new', :team_id => @team.id %>

</fieldset>